package com.icemelon.catdog.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.icemelon.catdog.pojo.User;
import org.apache.ibatis.annotations.Select;

import java.util.ArrayList;
import java.util.List;

import java.util.List;

public interface UserMapper extends BaseMapper<User> {

    //根据id查询user
    @Select("SELECT * FROM USER where id=#{id}")
    List<User> selectUserById(Integer id);

    //根据用户名查询user
    @Select("SELECT * FROM USER WHERE user_name=#{name}")
    User selectUserByName(String name);
}